package cloudoer.su.service;

import cloudoer.su.base.BaseService;
import cloudoer.su.entity.Menu;
import cloudoer.su.entity.Role;
import cloudoer.su.entity.User;
import cloudoer.su.exception.ServiceException;

import java.io.File;
import java.io.OutputStream;
import java.util.List;
import java.util.Set;

public interface RoleService extends BaseService {
    List<Role> getAll(String q);

    List<Role> getByPage(int pageNo, int pageSize);

    Role getById(String id);

    Role getByNumber(String number);

    String add(Role role);

    void update (Role role);

    void delete (String id);

    String importFile(File file) throws ServiceException;

    void exportFile(OutputStream os)throws Exception;

    Set<User> getUsers (String id);

    Set<Menu> getMenus (String id);

    void setMenus (String id, String[] menuIds);

    void deleteMenus(String id, String menuId);

    void setUsers(String id, String[] userIds);

    void deleteUsers(String id, String userId);

    int getCount();
}
